﻿namespace _5.工厂方法模式;

public interface ILeifengFactory
{
    LeiFeng CreateLeiFeng();
}

public class UnderGraduateFactory : ILeifengFactory
{
    public LeiFeng CreateLeiFeng()
    {
        return new UnderGraduate();
    }
}

public class VolunteerFactory : ILeifengFactory
{
    public LeiFeng CreateLeiFeng()
    {
        return new Volunteer();
    }
}
